package com.example.demo.modules.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum UserType {
    ADMIN(1, "管理员"),
    USER(2, "普通用户"),
    ;

    @EnumValue
    @JsonValue
    private final Integer code;
    private final String desc;

    UserType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
